import java.util.Scanner;

public class Main1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();
        int[][] arr = new int[n][2 * n + 1];

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < 2 * i + 1; j++) {
                if (i == 0 || i == 1) {
                    arr[i][j] = 1;
                } else {
                    if (j - 2 >= 0) {
                        if (2 * i - 1 == j) {
                            arr[i][j] = arr[i - 1][j - 2] + arr[i - 1][j - 1];
                        } else if (2 * i - 1 == j - 1) {
                            arr[i][j] = 1;
                        } else {
                            arr[i][j] = arr[i - 1][j - 2] + arr[i - 1][j - 1] + arr[i - 1][j];
                        }
                    } else if (j - 1 >= 0) {
                        arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
                    } else {
                        arr[i][j] = 1;
                    }
                }
            }
        }
        boolean flag = false;
        for (int j = 0; j < 2 * n + 1; j++) {
            if (arr[n - 1][j] % 2 == 0 && arr[n - 1][j] != 0) {
                System.out.println(j + 1);
                flag = true;
                break;
            }
        }
        if (!flag) {
            System.out.println(-1);
        }
    }
}
